home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11392 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: rcp6.elan.af.mil!rscernix!danpop
  2. From: danpop@mail.cern.ch (Dan Pop)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: How do you reset the computer using C on a PC ?
  5. Date: 21 Mar 96 01:35:41 GMT
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <danpop.827372141@rscernix>
  8. References: <31473FD4.48AA@ccis.com> <Pine.A32.3.91.960313183048.180818A-100000@red.weeg.uiowa.edu> <Pine.SOL.3.91.960320214653.20493A-100000@cmu>
  9. NNTP-Posting-Host: ues5.cern.ch
  10. X-Newsreader: NN version 6.5.0 #7 (NOV)
  11.  
  12. In <Pine.SOL.3.91.960320214653.20493A-100000@cmu> Verasak Sahachaisaree <scchi004@cmu> writes:
  13.  
  14.  
  15. >
  16. >/* Try this */
  17. >int main(void)
  18. >{
  19. >   void interrupt (* old)();
  20. >   old=0xFFFF0000;
  21.  
  22. If your compiler silently accepts this assignment, it's hopelessly broken.
  23. No matter what your compiler does, your code _is_ broken: integers and
  24. pointers aren't compatible types.
  25.  
  26. >   (* old)();
  27.  
  28. Why not simply "old();" ?
  29.  
  30. >}
  31.  
  32. Dan
  33. --
  34. Dan Pop
  35. CERN, CN Division
  36. Email: danpop@mail.cern.ch 
  37. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  38.